{% extends "header.html" %}

{% block title %}运维后台{% endblock %}
{% block contents %}
<td class="content">
<div class="bm_h cl"></div>
<div class="path">
<a href="#">监控系统</a>
<em>&rsaquo;</em> <a href="#">服务器监控</a></div>
<div class="bm">
    <div id="dataTable">
    <div class="title1">查询方式:</div>
    <span class="spt_1 b">IP：</span>
    <input class="f_inp" size="20" type="text" name="ipname" />
    <button type="submit" class="pnc pn"><span>查询</span></button>
<div class="title2">服务器列表:</div>
<div class="contbox mbn">
<table id="sortTable1">
        <thead>
            <tr>
                <th width="55">IP</th>
                <th class="hc" width="40">机房</th>
                <th class="hc" width="40">流量状态</th>
				<th class="hc" width="40">数据包状态</th>
				<th class="hc" width="40">连接数状态</th>
				<th class="hc" width="48">Mem使用状态</th>
				<th class="hc" width="45">Cpu负载状态</th>
				<th class="hc" width="45">Cpu使用状态</th>
                <th class="hc" width="15">操作</th>
            </tr>
        </thead>
		{% for state in state %}
            <tr>
                <td>{{ state.ip.ip }}</td>
                <td class="hc"><span>{{ state.ip.idc }}</span></td>
				{% if state.flow == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
				{% if state.package == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
				{% if state.count == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
				{% if state.mem == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
				{% if state.cpuload == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
				{% if state.cpuuse == '0' %}
                <td class="hc"><span class="icon_start" title="正常"></span></td>
				{% else %}
				<td class="hc"><span class="icon_close" title="警报"></span></td>
				{% endif %}
                <td class="hc"><a href ="/monitorsys/map/?mac={{ state.mac }}">查看</a></td>
            </tr>
		{% endfor %}
</table>
</div>
</div>
</div>
</td>
{% endblock %}
